import timber.ui.GridView;

/**
	Abstract base class for any object acting as a cell for a {@link GridView} object.
	
	This class should be subclassed to draw the cell how you need it. This can include
	attaching clips via linkage, creating them from scratch. However you see fit. 


	@author Chandler McWilliams
	@version 1.0
	@version 2006-11-29

**/
class timber.ui.GridViewCell
{
	private var grid:MovieClip;
	private var clip:MovieClip;
	private var cellNumber:Number;
	private var data:Object;

	public function GridViewCell(parent:GridView, aCellNumber:Number, aData:Object) {
		grid = parent;
		cellNumber = aCellNumber;
		data = aData;		
	}

// ===========================================================
// - DESTROY THE CELL
// ===========================================================
	public function destroy(Void):Void {
		clip.removeMovieClip();
	}

// ===========================================================
// - ACCESSORS
// ===========================================================
	public function getData(Void):Object { return data; }
	public function setData(d:Object):Void { data = d; }

	// for movieclip stuff
	public function set x (val:Number):Void 	{ clip._x = val; }
	public function set y (val:Number):Void 	{ clip._y = val; }
	public function get x ():Number { return clip._x; }
	public function get y ():Number { return clip._y; }

	public function set width (val:Number):Void 	{ clip._width = val; }
	public function get width ():Number { return clip._width; }

	public function set height (val:Number):Void 	{ clip._height = val; }
	public function get height ():Number { return clip._height; }
	
}